package game.util;

import javax.swing.*;
import java.awt.*;

/**
 * MessageDialog.java  Date Created: Aug 22, 2013
 *
 * Purpose: To display a message or error code.
 *
 * Description: This class will be used to display messages throughout the game as well as
 * used for debugging purposes to display error codes/msgs.
 *
 * @author Chrisb
 */
public final class MessageDialog {

    public static void displayMessage(Component parent, String msg) {
        JOptionPane.showMessageDialog(parent, msg);
    }

    public static void displayErrorCode(Component parent, String code) {
        JOptionPane.showMessageDialog(parent, code, "ERROR", JOptionPane.ERROR_MESSAGE);
    }

    public static void displayWarning(Component parent, String warning) {
        JOptionPane.showMessageDialog(parent, warning, "Warning", JOptionPane.WARNING_MESSAGE);
    }
}